const getTemp = ({ tempInfo }) => {
    const {
        candidateName = '',
        reviewPost = '',
        interviewWay = '',
        interviewTime = '',
        interviewLocation = '',
        recruitMaster = '',
        recruitMasterMobile = '',
        recruitMasterEmail = '',
        registerStatus = 0,
        key = '',
        talentCode = '',
        recruitMasterMobileAreaCode = ''
    } = tempInfo;
    const linkUrl = `<div><a>${window.location.origin}/user/confidential?talentCode=${talentCode}&key=${key}</a></div><br/>`;
    const nullText = '<Fragment></Fragment>';
    const linkText = '<div><br/>请于48小时内点击以下链接并提交相关信息：</div>';
    const phoneNumber = `${recruitMasterMobileAreaCode ? '+' : ''}${recruitMasterMobileAreaCode}${
        recruitMasterMobileAreaCode ? '-' : ''
    }${recruitMasterMobile}`;
    const temp = `
    <div>${candidateName}，</div>
    <div>你好。</div>
    <div>感谢关注微微科技，特此邀请您参加${reviewPost}职位的面试，以下是您的面试安排：</div>
    <div>面试方式：${interviewWay}</div>
    <div>面试时间：${interviewTime}</div>
    <div>面试地点：${interviewLocation || '--'}</div>
    ${registerStatus ? nullText : linkText}
    ${registerStatus ? nullText : linkUrl}
    <div>联系人：${recruitMaster}</div>
    <div>联系电话：${phoneNumber}</div>
    <div>联系邮箱：${recruitMasterEmail}</div>
    `;
    return temp;
};

export default getTemp;
